/* pages_goods/list/list.wxss */
.scroll-view {
  height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  padding: 20rpx;
  .search {
    flex: 1;
    background-color: #fff;
    .search-in {
      height: 60rpx;
      border-radius: 30rpx;
      display: flex;
      align-items: center;
      background-color: #f7f7f7;
      padding-left: 20rpx;
      font-size: 26rpx;
      color: #999;
      .search-text {
        padding-left: 10rpx;
      }
    }
    .center {
      justify-content: center;
    }
  }
  .show-view {
    width: 60rpx;
    height: 60rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10rpx;
  }
}

.tabs {
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  box-shadow: 0 4rpx 6rpx rgba(240, 240, 240, 0.6);
  height: 80rpx;

  .item {
    flex: 1;
    padding: 20rpx;
    font-size: 28rpx;
    color: #262626;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .active {
    color: #e49a3d;
  }

  .price_icons {
    width: 24rpx;
    height: 40rpx;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-left: 10rpx;
    .iconfont {
      font-size: 24rpx;
      width: 20rpx;
      height: 18rpx;
      color: #262626;
      &.active {
        color: #e49a3d;
      }
    }
  }
}

// 商品列表
.goods-list {
  background-color: #fafafa;
  .goods-item {
    background-color: #fff;
    display: flex;
    margin-bottom: 12rpx;
    padding: 20rpx;

    // 左侧图片
    .item-left {
      width: 240rpx;
      height: 240rpx;
    }
    // 右侧信息
    .item-right {
      margin-left: 20rpx;
      flex: 1;
      // 两端对齐
      display: flex;
      flex-direction: column;

      // 标题
      .goods_title {
        // 两行溢出隐藏
        display: -webkit-box;
        word-break: break-all;
        text-overflow: ellipsis;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.5;
        white-space: normal;
        color: #484848;
        font-size: 28rpx;
      }

      .goods_sales {
        color: #999;
        font-size: 24rpx;
        flex: 1;
        margin-top: 10rpx;
      }

      // 价格
      .goods_price {
        .price {
          font-size: 34rpx;
          // 价格符号
          &::before {
            content: '￥';
            font-size: 80%;
          }
        }
        .min {
          color: #f03c3c;
        }
        .max {
          font-size: 90%;
          color: #ccc;
          text-decoration: line-through;
        }
      }
    }
  }

  // 网格排列
  &.is-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 1%;
    .goods-item {
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      background-color: #fff;
      width: 48%;
      margin: 1%;
      padding: 0;

      // 左侧图片
      .item-left {
        width: 100%;
        height: 360rpx;
      }
      // 右侧信息
      .item-right {
        margin: 10rpx;

        // 标题
        .goods_title {
          font-size: 26rpx;
        }

        .goods_sales {
          display: none;
        }

        // 价格
        .goods_price {
          .price {
            font-size: 30rpx;
          }
          .max {
            font-size: 24rpx;
          }
        }
      }
    }
  }
}
